package com.wk.service.implement;

import com.wk.dao.Blogsdao;
import com.wk.pojo.Blogs;
import com.wk.pojo.Blogs_comment;
import com.wk.pojo.Blogs_reply;
import com.wk.service.Blogsservice;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @program: thesis
 * @description: 学生的博客类
 * @author: 王侃
 * @create: 2020-03-02 15:20
 **/
@Service
public class Blogsserviceimpl implements Blogsservice {

    @Autowired
    Blogsdao blogsdao;

    @Override
    public List<Blogs> selectbyallblogs(String subject,String username) {
        return blogsdao.selectbyallblogs(subject,username);
    }

    @Override
    public List<Blogs> selectbyallblogs_praise(String subject,String username) {
        return blogsdao.selectbyallblogs_praise(subject,username);
    }

    @Override
    public void insertintoBlogs(Blogs blogs) {
        blogsdao.insertintoBlogs(blogs);
    }

    @Override
    public void updatebyidpraise_blog(Integer id) {
        blogsdao.updatebyidpraise_blog(id);
    }

    @Override
    public List<Blogs> selectbyuserid_blogs(Integer user_id) {
        return blogsdao.selectbyuserid_blogs(user_id);
    }

    @Override
    public Blogs selectbyidblog(Integer id) {
        return blogsdao.selectbyidblog(id);
    }

    @Override
    public void updatebyblog(Blogs blogs) {
        blogsdao.updatebyblog(blogs);
    }

    @Override
    public void deletebyidblog(Integer id) {
        blogsdao.deletebyidblog(id);
    }

    @Override
    public List<Blogs_comment> selectbyallblog_comment(Integer blog_id) {
        return blogsdao.selectbyallblog_comment(blog_id);
    }

    @Override
    public void insertintoblog_comment(Blogs_comment comment) {
        blogsdao.insertintoblog_comment(comment);
    }

    @Override
    public void deletebyidcomment(Integer id) {
        blogsdao.deletebyidcomment(id);
    }

    @Override
    public void updateidcomment_praise(Integer id) {
        blogsdao.updateidcomment_praise(id);
    }

    @Override
    public List<Blogs_reply> selectbycomment_id_reply(Integer comment_id) {
        return blogsdao.selectbycomment_id_reply(comment_id);
    }

    @Override
    public Blogs_comment selectbyid_blogs_comment(Integer id) {
        return blogsdao.selectbyid_blogs_comment(id);
    }

    @Override
    public void insertintocomment_reply(Blogs_reply reply) {
        blogsdao.insertintocomment_reply(reply);
    }

    @Override
    public void deletemycomment_reply(Integer id) {
        blogsdao.deletemycomment_reply(id);
    }
}
